package ee.subjects.backend.model.dao;

import java.util.List;

import ee.subjects.backend.model.data.Address;
import ee.subjects.backend.model.data.Address_type;

public interface AddressDAO 
{
	/**
	 * Iga uue aadressi sisestamisel, kui tegu on subjektiga Person, tuleb kontrollida, ega 
	 * lisatav aadress
	 * @param address
	 * @return
	 */
	public int insertAddress(Address address);
	public Address findAddressById(int addressId);
	public boolean updateAddress(Address updatedAddressObject);
	public boolean deleteAddressById(int addressId);
	

	public Address_type getAddress_typeById(int address_typeId);
	/**
	 * Tagastatavate <code>Address</code> objektidele on lisatud ka veel temaga seotud 
	 * <code>Address_type</code> objektid.
	 * @param subjectId
	 * @param subject_typeId
	 * @return
	 */
	public List<Address> getAllSubjectAddresses(int subjectId, int subject_typeId);
	//public int setSubjectAddressType(int subjectId, int subject_typeId);
	public int setPersonAddressAddressTypeToMainAddressType(int addressId, int personId, int person_subject_typeId);
	
}
